import { Controller, Get, Post, Sse, Body, Header } from "@nestjs/common";
import { ChatService } from "./chat.service";

@Controller("v1/chat")
export class ChatController {
  constructor(
    private readonly chatService: ChatService
  ) {}
  @Post("completions")
  @Sse()
  handleCompletions(@Body() body: any) {
    return this.chatService.handleCompletions(body)
  }
  @Get("check-proxy")
  checkProxy() {
    return this.chatService.checkProxy()
  }

  @Sse("get-cookie")
  getCookie() {
    return this.chatService.getCookie()
  }
}